<table cellspacing="0" cellpadding="0" style="border-width:0 0 1px;" class="table-action">
    <tbody>
        <tr valign="middle">
            <td> 
                <{button label='上一条' class="btn btn-primary" id="btn_prev" }>
                <{button label='下一条' class="btn btn-primary" id="btn_next" }>
            </td>
        </tr>
    </tbody>
</table>

<h3><{t}>物流对账单明细<{/t}></h3>
<div class="tableform">
 <div class="division">

		 <table border="0" cellpadding="0" cellspacing="0" class="girdlist">
		 <tbody>
             <tr >
               <th width="114" align="left"  ><h4 align="left">出货信息</h4></th>
                    <th width="307" align="left" >&nbsp;</th>
                    <th width="112" align="left" >&nbsp;</th>
                    <th width="266" align="left"  >&nbsp;</th>
             </tr>
                <tr >
                    <th ><t>出货仓库:</t></th>
                  <td><{$actual.branch_name|default:'-'}></td>
                  <th>快递公司:</th>
                  <td><{$actual.logi_name|default:'-'}></td>
                </tr>
            
                <tr >
                    <th ><t>发货时间:</t></th>
                    <td><{$actual.delivery_time|date_format:"%Y-%m-%d"}></td>
                    <th><t>订单号：</t></th>
                    <td><{$actual.order_bn|default:'-'}></td>
                </tr>
            <tr >
                    <th align="left"><h4 align="left">收件人信息</h4></th>
                    <th align="left">&nbsp;</th>
                    <th align="left">&nbsp;</th>
                    <th align="left">&nbsp;</th>
            </tr>
            <tr >
                    <th><t>收件人：</t></th>
                    <td ><{$actual.ship_name|default:'-'}></td>
                    <th ><t>收货地区:</t></th>
                    <td ><{$actual.ship_city|default:'-'}></td>
            </tr>
            <tr >
                    <th><t>收件地址：</t></th>
                    <td colspan="3" ><{$actual.ship_addr|default:'-'}></td>
            </tr>
                <tr >
                    <th align="left"><h4 align="left">对账信息确认</h4></th>
                    <th align="left">&nbsp;</th>
                    <th align="left">&nbsp;</th>
                    <th align="left">&nbsp;</th>
                </tr>
                <tr >
                    <th><t>出库称重:</t></th>
                    <td><{$actual.weight|default:'-'}></td>
                    <th><t>预估运费:</t>                     </th>
                    <td> <{$actual.delivery_cost_expect|cur}></td>
                </tr>
                <tr >
                  <th><t>物流称重:</t></th>
                  <td><{$actual.logi_weight|default:'-'}></td>
                  <th><t>账单金额:</t>                   </th>
                  <td> <{$actual.delivery_cost_actual|cur}></td>
                </tr>
                <tr >
                 
                  <th><t>记账状态:</t>                  </th>
                  <td>  <{$actual.confirm_flag}></td>
                   <th><t>记账费用:</t></th>
                  <td><{$actual.actual_amount|cur}></td>
                </tr>
                   <tr >
                  <th><t>审核人:</t></th>
                  <td><{$actual.confirm_name|default:'-'}>
                 </td>
                  <th><t>审核时间:</t>                    </th>
                  <td><{if $actual.confirm_time!=''}>
                  <{$actual.confirm_time|date_format:"%Y-%m-%d"}>
                  <{else}>
                  -
                  <{/if}>
                  </td>
                </tr>
                <tr >
                  <th><t>备注:</t></th>
                  <td><{$actual.memo|default:'-'}></td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
				</tbody>
   </table>
	<div class="table-action">

    <{button label="关闭" type="button" id="actual-close-btn" class="btn-primary"}>
</div>
		
</div>
<script>
(function(){
var curr_id = '<{$actual.aid}>';
    var filter = [];
    var prev_id = '';
    var next_id = '';
    var dataNode = document.getElementById('finder-list-<{$env.get.finder_id}>').getElements('tr').get('item-id');
    
    var data = dataNode.filter(function(d){return filter.indexOf(d) == -1;});
    var index = data.indexOf(curr_id);
    if(index >= 0){
        if(index > 0) prev_id = data[index - 1];
        if(index + 1 <= data.length) next_id = data[index + 1];
    }
     var url='index.php?app=logisticsaccounts&ctl=admin_actual&act=detail_basic&finder_id=<{$env.get.finder_id}>';
    $('btn_prev').addEvent('click',function(e){
        if(prev_id) {
            this.getParent('.dialog').retrieve('instance').close();
            new Dialog(url+'&p[0]='+prev_id,{title:'查看详情',width:600,height:500})
            
            
        } else {
            alert('没有上一条了');
        }
    });
    $('btn_next').addEvent('click',function(e){
        if(next_id) {
            this.getParent('.dialog').retrieve('instance').close();
            new Dialog(url+'&p[0]='+next_id,{title:'查看详情',width:600,height:550})
        } else {
            alert('没有下一条或已经到了页尾');
        }
    }); 
  
$('actual-close-btn').addEvent('click',function(e){
	this.getParent('.dialog').retrieve('instance').close();
});
})();


</script>